//
//  HeaderWithButtonCollectionReusableView.m
//  UI14_homework(礼物说发现->攻略页面)
//
//  Created by Hanlingyu on 16/8/2.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "HeaderWithButtonCollectionReusableView.h"

@implementation HeaderWithButtonCollectionReusableView
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, CGRectGetWidth(frame) / 4, CGRectGetHeight(frame))];
        _titleLabel.font = [UIFont systemFontOfSize:14];
        _titleLabel.textColor = [UIColor lightGrayColor];
        [self addSubview:_titleLabel];
        
        _moreButton = [UIButton buttonWithType:UIButtonTypeCustom];
        CGFloat moreButtonWidth = 100;
        _moreButton.frame = CGRectMake(CGRectGetWidth(frame) - 100, 0, moreButtonWidth, CGRectGetHeight(frame));
        [_moreButton setTitle:@"查看全部>" forState:UIControlStateNormal];
        [_moreButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
        _moreButton.titleLabel.font = [UIFont systemFontOfSize:13];
        [self addSubview:_moreButton];
    }
    return self;
}

@end
